﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="COB.SharePoint.Ribbon.CodeWrapper" Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Ribbon.Templates.CodeWrapper.OneLargeExample">
            <Layout Title="CodeWrapperOneLarge" LayoutTitle="CodeWrapperOneLarge">
              <Section Alignment="Top" Type="ThreeRow">
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="CppAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="CSharpAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="CssAlias" /></Row>
              </Section>
              <Section Alignment="Top" Type="ThreeRow">
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="JavaAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="JSAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="PerlAlias" /></Row>
              </Section>
              <Section Alignment="Top" Type="ThreeRow">
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="PhpAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="PythonAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="RubyAlias" /></Row>
              </Section>
              <Section Alignment="Top" Type="ThreeRow">
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="SqlAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="VbAlias" /></Row>
                <Row><ControlRef DisplayMode="Medium" TemplateAlias="XmlAlias" /></Row>
              </Section>
            </Layout>
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.EditingTools.CPEditTab.Scaling._children">
          <MaxSize Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.MaxSize" Sequence="100" GroupId="COB.SharePoint.Ribbon.CodeWrapper.TextEdit" Size="CodeWrapperOneLarge" />
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.EditingTools.CPEditTab.Groups._children">
          <Group Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit" Sequence="100" Description="Used to demo adding a group" Title="Code" Template="Ribbon.Templates.CodeWrapper.OneLargeExample">
            <Controls Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls">
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Cpp" Command="COB.CodeWrapper.Command.Controls.Cpp" Sequence="10" Image16by16="" ToolTipTitle="Applies Cpp style" LabelText="Cpp" TemplateAlias="CppAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.CSharp" Command="COB.CodeWrapper.Command.Controls.CSharp" Sequence="10" Image16by16="" ToolTipTitle="Applies C# style" LabelText="C#" TemplateAlias="CSharpAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Css" Command="COB.CodeWrapper.Command.Controls.Css" Sequence="10" Image16by16="" ToolTipTitle="Applies Css style" LabelText="Css" TemplateAlias="CssAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Java" Command="COB.CodeWrapper.Command.Controls.Java" Sequence="10" Image16by16="" ToolTipTitle="Applies Java style" LabelText="Java" TemplateAlias="JavaAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.JS" Command="COB.CodeWrapper.Command.Controls.JS" Sequence="10" Image16by16="" ToolTipTitle="Applies JS style" LabelText="JS" TemplateAlias="JSAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Perl" Command="COB.CodeWrapper.Command.Controls.Perl" Sequence="10" Image16by16="" ToolTipTitle="Applies Perl style" LabelText="Perl" TemplateAlias="PerlAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Php" Command="COB.CodeWrapper.Command.Controls.Php" Sequence="10" Image16by16="" ToolTipTitle="Applies Php style" LabelText="Php" TemplateAlias="PhpAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Python" Command="COB.CodeWrapper.Command.Controls.Python" Sequence="10" Image16by16="" ToolTipTitle="Applies Python style" LabelText="Python" TemplateAlias="PythonAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Ruby" Command="COB.CodeWrapper.Command.Controls.Ruby" Sequence="10" Image16by16="" ToolTipTitle="Applies Ruby style" LabelText="Ruby" TemplateAlias="RubyAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Sql" Command="COB.CodeWrapper.Command.Controls.Sql" Sequence="10" Image16by16="" ToolTipTitle="Applies Sql style" LabelText="Sql" TemplateAlias="SqlAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Vb" Command="COB.CodeWrapper.Command.Controls.Vb" Sequence="10" Image16by16="" ToolTipTitle="Applies Vb style" LabelText="Vb" TemplateAlias="VbAlias" />
              <Button Id="COB.SharePoint.Ribbon.CodeWrapper.TextEdit.Controls.Xml" Command="COB.CodeWrapper.Command.Controls.Xml" Sequence="10" Image16by16="" ToolTipTitle="Applies Xml style" LabelText="Xml" TemplateAlias="XmlAlias" />
            </Controls>
          </Group>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Cpp" CommandAction="javascript: shnt.processCode('cpp');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.CSharp" CommandAction="javascript: shnt.processCode('c#');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Css" CommandAction="javascript: shnt.processCode('css');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Java" CommandAction="javascript: shnt.processCode('java');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.JS" CommandAction="javascript: shnt.processCode('js');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Perl" CommandAction="javascript: shnt.processCode('perl');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Php" CommandAction="javascript: shnt.processCode('php');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Python" CommandAction="javascript: shnt.processCode('py');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Ruby" CommandAction="javascript: shnt.processCode('ruby');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Sql" CommandAction="javascript: shnt.processCode('sql');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Vb" CommandAction="javascript: shnt.processCode('vb');" />
        <CommandUIHandler Command="COB.CodeWrapper.Command.Controls.Xml" CommandAction="javascript: shnt.processCode('xml');" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
